<template>
    <div class="box">
        {{num}}
        <digui v-if='num>0' :num="num-1"></digui>
    </div>
</template>

<script>
export default {
    name:'digui',
    props:['num']

}
</script>

<style lang="less">
 .box{
     padding: 3px;
     margin: 3px;
     border: 1px solid red;
 }
</style>